<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<div th:replace="common :: foo">
</div>
<body>
    <form th:action="@{/userController/toUpdate}" method="post">
        <input th:value="${items.id}" th:name="id">&nbsp;
        <input th:value="${items.itemName}" th:name="itemName">&nbsp;
        <select th:name="isMarketable">
            <option th:value="1" th:if="${items.isMarketable eq 1}">上架</option>
            <option th:value="0" th:if="${items.isMarketable eq 0}">下架</option>
        </select>&nbsp;
        <select th:name="itemType">
            <option th:each="type:${type}" th:value="${type.id}" th:selected="${items.itemType eq type.id}">[[${type.typeName}]]</option>
        </select>&nbsp&nbsp;
        <button type="submit">修改</button>
    </form>
</body>
<script th:inline="javascript">
    var it = [[${items}]]
    alert(it)
</script>
</html>